package top.mccat.common.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.mccat.common.core.domain.bk.BkProductRecord;
import top.mccat.common.core.domain.bk.BkSupplieRecord;
import top.mccat.common.mapper.bk.BkProductRecordMapper;
import top.mccat.common.service.IBkProductRecordService;

/**
 * 产品供货记录Service业务层处理
 * 
 * @author raven
 * @date 2022-11-24
 */
@Service
public class BkProductRecordServiceImpl implements IBkProductRecordService
{
    @Autowired
    private BkProductRecordMapper bkProductRecordMapper;

    /**
     * 查询产品供货记录
     * 
     * @param productId 产品供货记录主键
     * @return 产品供货记录
     */
    @Override
    public BkProductRecord selectBkProductRecordByProductId(Integer productId)
    {
        return bkProductRecordMapper.selectBkProductRecordByProductId(productId);
    }

    /**
     * 查询产品供货记录列表
     * 
     * @param bkSupplieRecord 产品供货记录
     * @return 产品供货记录
     */
    @Override
    public List<BkProductRecord> selectBkProductRecordList(BkSupplieRecord bkSupplieRecord)
    {
        return bkProductRecordMapper.selectBkProductRecordList(bkSupplieRecord);
    }

    /**
     * 新增产品供货记录
     * 
     * @param bkSupplieRecord 产品供货记录
     * @return 结果
     */
    @Override
    public int insertBkProductRecord(BkSupplieRecord bkSupplieRecord)
    {
        return bkProductRecordMapper.insertBkProductRecord(bkSupplieRecord);
    }

    /**
     * 修改产品供货记录
     * 
     * @param bkSupplieRecord 产品供货记录
     * @return 结果
     */
    @Override
    public int updateBkProductRecord(BkSupplieRecord bkSupplieRecord)
    {
        return bkProductRecordMapper.updateBkProductRecord(bkSupplieRecord);
    }

    /**
     * 批量删除产品供货记录
     * 
     * @param productIds 需要删除的产品供货记录主键
     * @return 结果
     */
    @Override
    public int deleteBkProductRecordByProductIds(Integer[] productIds)
    {
        return bkProductRecordMapper.deleteBkProductRecordByProductIds(productIds);
    }

    /**
     * 删除产品供货记录信息
     * 
     * @param productId 产品供货记录主键
     * @return 结果
     */
    @Override
    public int deleteBkProductRecordByProductId(Integer productId)
    {
        return bkProductRecordMapper.deleteBkProductRecordByProductId(productId);
    }

    /**
     * 删除商品进货记录链接信息
     *
     * @param recordId 商品进货记录链接主键
     * @return 结果
     */
    @Override
    public int deleteBkProductRecordByRecordId(Integer recordId) {
        return bkProductRecordMapper.deleteBkProductRecordByRecordId(recordId);
    }

    /**
     * 删除商品进货记录链接信息
     *
     * @param recordId 商品进货记录链接主键
     * @return 结果
     */
    @Override
    public int deleteBkProductRecordByRecordIds(Integer[] recordId) {
        return bkProductRecordMapper.deleteBkProductRecordByRecordIds(recordId);
    }
}
